package com.usian.service;

import com.usian.mapper.UserMapper;
import com.usian.pojo.Dept;
import com.usian.pojo.QueryVo;
import com.usian.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public List<Dept> findDept() {
        return userMapper.findDept();
    }

    @Override
    public void add(User user) {
        userMapper.add(user);
    }

    @Override
    public List<QueryVo> findAll(QueryVo queryVo) {
        return userMapper.findAll(queryVo);
    }

    @Override
    public void delete(Integer id) {
        userMapper.delete(id);
    }

    @Override
    public User findid(Integer id) {
        return userMapper.findid(id);
    }

    @Override
    public void edit(User user) {
    userMapper.edit(user);
    }
}
